﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace intelliSys.UI.Interaction.MouseGesture
{
    /// <summary>
    /// This class defines structures and methods native to Microsoft Windows 
    /// </summary>
    internal class Win32
    {
        /// <summary>
        /// This is the structure for Point.
        /// </summary>
        [StructLayout(LayoutKind.Sequential)]
        public struct Point
        {
            public int X;
            public int Y;
            public Point(int x, int y)
            {
                X = x;
                Y = y;
            }
        }
        /// <summary>
        /// This method is used to get mouse position from the screen.
        /// </summary>
        /// <param name="pt">The Mouse position</param>
        /// <returns>Whether this call is successful</returns>
        [DllImport("user32.dll", CharSet = CharSet.Auto)]
        public static extern bool GetCursorPos(out Win32.Point pt);
    }
}
